{%- if page.platform_type == 'cloud' and page.platform_code == 'aws' %}
{% if include.mode == 'hosts' %}
{% snippetcut %}
```shell
BALANCER_HOSTNAME=$(sudo /opt/deckhouse/bin/kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].hostname') && \
BALANCER_IP=$(dig "$BALANCER_HOSTNAME" +short | head -1) && echo "Balancer IP is ${BALANCER_IP}"
```
{% endsnippetcut %}
{% else %}
{% snippetcut %}
```shell
sudo /opt/deckhouse/bin/kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].hostname'
```
{% endsnippetcut %}
{%- endif -%}
{%- elsif page.platform_type == 'cloud' and page.platform_code != 'vsphere' %}
{% if include.mode == 'hosts' %}
{% snippetcut %}
```shell
BALANCER_IP=$(sudo /opt/deckhouse/bin/kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].ip') && \
```
{% endsnippetcut %}
{% else %}
{% snippetcut %}
```shell
sudo /opt/deckhouse/bin/kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].ip'
```
{% endsnippetcut %}
{%- endif -%}
{%- endif -%}
